package du.myseckill.dto;

import du.myseckill.enums.SecKillStatEnum;
import du.myseckill.pojo.UserSecKill;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class SeckillExcecution {
    private long goodsId;
    private int state;
    private String stateInfo;
    private UserSecKill userSecKill;

    public SeckillExcecution(long goodsId, SecKillStatEnum secKillStatEnum, UserSecKill userSecKill) {
        this.goodsId = goodsId;
        this.state = secKillStatEnum.getStat();
        this.stateInfo = secKillStatEnum.getStatInfo();
        this.userSecKill= userSecKill;
    }

    public SeckillExcecution(long goodsId, SecKillStatEnum secKillStatEnum) {
        this.goodsId = goodsId;
        this.state = secKillStatEnum.getStat();
        this.stateInfo = secKillStatEnum.getStatInfo();
    }

}
